.header {
    height: 50px;
    padding: 0 20px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--bg);
    color: var(--text);
  
    display: flex;
    align-items: center;
    justify-content: space-between;

    .logo {
      display: flex;
      align-items: center;
      cursor: pointer;
      transition: transform 0.2s ease;
      
      &:hover {
        transform: translateY(-1px);
      
        .title {
          filter: drop-shadow(0 0 6px rgba(74, 136, 255, 0.7));
        }
        
        .logoShield {
          filter: drop-shadow(0 0 8px rgba(74, 136, 255, 0.6));
        }
        
        .subtitle {
          color: #c4d3f0;
        }
      }
      
      a {
        text-decoration: none;
        color: var(--text);
        display: flex;
        align-items: center;
      }
    }
    
    .logoShield {
      position: relative;
      width: 36px;
      height: 36px;
      margin-right: 12px;
      filter: drop-shadow(0 0 4px rgba(74, 136, 255, 0.3));
      transition: filter 0.2s ease;
    }
    
    .shieldIcon {
      position: absolute;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #4a88ff;
    }
    
    .codeIcon {
      position: absolute;
      width: 60%;
      height: 60%;
      top: 20%;
      left: 20%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ffffff;
      
      :global(.light) & {
        color: #f8f8f8;
      }
    }
    
    .titleGroup {
      display: flex;
      flex-direction: column;
      margin-left: 2px;
    }
    
    .title {
      font-size: 22px;
      font-weight: 700;
      margin: 0;
      line-height: 1.2;
      background: linear-gradient(90deg, #4a88ff, #7f69f8);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      filter: drop-shadow(0 0 2px rgba(74, 136, 255, 0.4));
      transition: filter 0.2s ease;
    }
    
    .subtitle {
      font-size: 12px;
      font-weight: normal;
      margin: 0;
      color: #a3b2cc;
      line-height: 1.2;
      transition: color 0.2s ease;
    }

    .theme {
      cursor: pointer;
      font-size: 18px;
      transition: color 0.2s ease;
      
      &:hover {
        color: #4a88ff;
      }
    }
    
    .links {
      display: flex;
      align-items: center;
      margin-right: 320px;
      
      > * {
        margin-left: 15px;
        cursor: pointer;
        transition: color 0.2s ease;
        
        &:hover {
          color: #4a88ff;
        }
      }
    }

    .userAvatar {
      cursor: pointer;
      margin-left: 15px;
      box-shadow: 0 0 0 2px rgba(74, 136, 255, 0.2);
      transition: all 0.3s ease;
      
      &:hover {
        transform: scale(1.05);
        box-shadow: 0 0 0 2px rgba(74, 136, 255, 0.5);
      }
    }
}

/* 首页专用的Header样式 */
.homepageHeader {
  background-color: #0c0f18; /* 暗色背景 */
  border-bottom: none; /* 移除边框 */
  position: absolute; /* 绝对定位，覆盖在首页内容上方 */
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  
  .logo {
    .title {
      filter: drop-shadow(0 0 6px rgba(74, 136, 255, 0.7));
    }
    
    .subtitle {
      color: #a3b2cc;
    }
  }
  
  .links {
    margin-right: 20px; /* 减小右侧间距，因为元素更少 */
  }
}

:global(.light) {
  .header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  /* 即使在亮色模式下，首页的Header也保持暗色 */
  .homepageHeader {
    background-color: #0c0f18;
    border-bottom: none;
    
    .title {
      background: linear-gradient(90deg, #4a88ff, #7f69f8);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    
    .subtitle {
      color: #a3b2cc;
    }
  }
}
